home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / art&graf.ix / art-3485 / art-5570 / depth2.pov < prev    next >
Text File  |  1994-08-09  |  1KB  |  67 lines

  1. // SIRDS z-depth data with POV-Ray #2
  2. // )C( 7/1994 Christian Perle
  3.  
  4. #include "colors.inc"
  5.  
  6. camera {
  7.   location  <0, 0, -9>
  8.   direction <0, 0, 2.8>
  9.   up        <0, 1, 0>
  10.   right     <640/470, 0, 0>
  11.   look_at   <0, 0, 2.5>
  12. }
  13.  
  14. #declare Tyre = difference {
  15.   cylinder { <0, 0, 0>, <1, 0, 0>, 1.4 }
  16.   cone {
  17.     <.5, 0, 0>, 1
  18.     <1.1, 0, 0>, 1.3
  19.   }
  20. }
  21.  
  22. #declare Car = union {
  23.   difference {  // Car body
  24.     box { <-1, 0, -2>, <1, 1, 2> }
  25.     cylinder { <-1.1, 5.2, -1.5>, <1.1, 5.2, -1.5>, 5 }
  26.   }
  27.   union {  // Tyres
  28.     object { Tyre scale .4 translate <1, 0, -.9> }
  29.     object { Tyre scale .4 translate <1, 0, .9> }
  30.     object { Tyre scale .4 rotate 180*y translate <-1, 0, -.9> }
  31.     object { Tyre scale .4 rotate 180*y translate <-1, 0, .9> }
  32.   }
  33.   sphere {  // Windshield
  34.     <0, 0, 0>, 1
  35.     scale <.8, .2, 1.2>
  36.     rotate -20*x
  37.     translate 0.5*y
  38.   }
  39.   union {  // Lights
  40.     box { <-.95, .05, -2.05>, <-.65, .15, -2> }
  41.     box { <.65, .05, -2.05>, <.95, .15, -2> }
  42.   }
  43.   union {
  44.     box { <-.95, .2, 2>, <-.8, .8, 2.05> }
  45.     box { <.8, .2, 2>, <.95, .8, 2.05> }
  46.   }
  47.   bounded_by { box { <-1.42, -.58, -2.07>, <1.42, 1.02, 2.07> } }
  48. }
  49.  
  50. object {
  51.   Car
  52.   scale .5
  53.   rotate <-20, 47, 0>
  54.   translate <0, .1, 1.08>
  55.  
  56.   pigment {  // white/black gradient
  57.     gradient z
  58.     translate -10*z
  59.     color_map {
  60.       [0 color White]
  61.       [1 color Black]
  62.     }
  63.     scale 2
  64.   }
  65.   finish { ambient 1 diffuse 0 }
  66. }
  67.